#ifndef BASERESP_H
#define BASERESP_H

#include <QString>
#include <QMap>
#include "../lib/osdjson.h"
#include "remoteerr.h"

#include <QMetaType>

class BaseResp
{
public:
    explicit BaseResp();
    virtual ~BaseResp();

    virtual void unserialize(QString json);

    void setCode(QString code);
    QString getCode() const;
    QString getCodeString();

    bool getIsSuccess() const;

    QString baseName() const;
    void setBaseName(const QString &baseName);

protected:
    QString code;
    QString err;
    OSDJson m_json;
    bool isSuccess;
    QString m_baseName;

private:
    QMap<QString, QString> m_map;
};

Q_DECLARE_METATYPE(BaseResp)

#endif // BASERESP_H
